package gui.keyActions;

import gui.MainPanel;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

public class IncrementSpeedAction extends AbstractAction{
	private MainPanel target;

	public IncrementSpeedAction(MainPanel target) {
		super();
		this.target = target;
	}

	

	@Override
	public void actionPerformed(ActionEvent arg0) {
		this.target.getDrawPanel().fasterAnimation();
		this.target.getButtonPanel().getSliderPolig().setValue((int) (this.target.getDrawPanel().MAX_SPACING_BETWEEN_FRAMES - this.target.getDrawPanel().getSpeed()));
	}

}
